home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-11-01 | 33.0 KB | 1,046 lines | [TEXT/MPS ] |
- {
- File: AppleShareFileServerControl.p
-
- Contains: Interface definitions for Server Control calls, and Server Event constants;
-
- Version: Technology: AppleShare IP 6.0
- Release: ASIP 6.2 SDK - Wednesday, August 25, 1999 09:29:55
-
- Copyright: © 1995-1999 by Apple Computer, Inc., all rights reserved.
-
- Bugs?: For bug reports, consult the following page on
- the World Wide Web:
-
- http://developer.apple.com/bugreporter/
-
- }
- {$IFC UNDEFINED UsingIncludes}
- {$SETC UsingIncludes := 0}
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- UNIT AppleShareFileServerControl;
- INTERFACE
- {$ENDC}
-
- {$IFC UNDEFINED __APPLESHAREFILESERVERCONTROL__}
- {$SETC __APPLESHAREFILESERVERCONTROL__ := 1}
-
- {$I+}
- {$SETC AppleShareFileServerControlIncludes := UsingIncludes}
- {$SETC UsingIncludes := 1}
-
- {$IFC UNDEFINED __APPLETALK__}
- {$I AppleTalk.p}
- {$ENDC}
- {$IFC UNDEFINED __FILES__}
- {$I Files.p}
- {$ENDC}
- {$IFC UNDEFINED __MIXEDMODE__}
- {$I MixedMode.p}
- {$ENDC}
- {$IFC UNDEFINED __TRAPS__}
- {$I Traps.p}
- {$ENDC}
-
-
- {$PUSH}
- {$ALIGN MAC68K}
- {$LibExport+}
-
- { Server Control Codes ---------------------------------------------------------------------------- }
-
- CONST
- kSCStartServer = 0; { Use StartParam variant }
- kSCShutDown = 2; { Use DisconnectParam variant }
- kSCCancelShutDown = 3; { Use DisconnectParam variant }
- kSCDisconnect = 4; { Use DisconnectParam variant }
- kSCPollServer = 5; { Use PollServerParam variant }
- kSCGetExpFldr = 6; { Use StandardParam variant }
- kSCGetSetupInfo = 7; { Use SetupParam variant }
- kSCSetSetupInfo = 8; { Use SetupParam variant }
- kSCSendMessage = 9; { Use DisconnectParam variant }
- kSCGetServerStatus = 10; { Use StatusParam variant }
- kSCInstallServerEventProc = 11; { Use ServerEventParam variant }
- kSCRemoveServerEventProc = 12; { Use ServerEventParam variant }
- kSCGetServerEventProc = 13; { Use ServerEventParam variant }
- kSCServerVersion = 14; { Use VersionParam variant }
- kSCSetCopyProtect = 16; { Use StandardParam variant }
- kSCClrCopyProtect = 17; { Use StandardParam variant }
- kSCDisconnectVolUsers = 18; { Use DisconnectParam variant }
- kSCGetUserNameRec = 19; { Use UserInfoParam variant }
- kSCGetUserMountInfo = 20; { Use VolMountedParam variant }
- kSCWakeServer = 21; { Use StartParam variant }
- kSCSleepServer = 22; { Use DisconnectParam variant }
- kSCGetCacheStats = 23; { Use GetCacheStatsParam variant }
- kSCResetCache = 31; { Use ResetCacheParam variant }
- kSCGetExtUserNameRec = 35; { Use ExtUserInfoParam variant }
- kSCServiceStateInfo = 38; { Use ServiceStateParam variant }
- kSCGetPlugInInfo = 41; { Use PlugInInfoParam variant }
- kSCGetPlugInMimeType = 42; { Use PlugInMimeTypeParam variant }
- kSCSetHistorySampleTime = 43; { Use SetHistoryParam variant }
- kSCGetServerActivityHistory = 44; { Use GetHistoryParam variant }
- kSCGetSMBConfig = 46; { Use SMBConfigParam variant }
- kSCBlockGetUserList = 47; { Use BlockUserRecParam variant }
-
- { General Constants ------------------------------------------------------------------------------- }
- { PollServer scServerState responses... }
- kSCPollRunning = -1;
- kSCPollStartingUp = -2;
- kSCPollJustDisabled = -3;
- kSCPollDisabledErr = -4;
- kSCPollSleeping = -5;
-
- { PollServer scDisconnectState responses... }
- kSCNotDisconnecting = -1;
- kSCDisconnectWithin29Secs = 0;
- kSCDisconnect30To89Secs = 1; { Any other value is the number of minutes remaining, rounded... }
-
- { PollServer scServerErrors responses... }
- kSCModernMemMgrOffErr = 1; { Must run with Modern Memory Manager }
- kSCNoThreadLibraryErr = 2;
- kSCServiceNotInstalledErr = 3;
- kSCInsuffMFMemErr = 4;
- kSCCantRegNameErr = 5;
- kSCCantFindExtnFolderErr = 6;
- kSCUnExATalkErr = 7;
- kSCNoMachineNameErr = 8;
- kSCCantFindFSExtnErr = 9;
- kSCATalkOffErr = 10;
- kSCNoInitRunErr = 12;
- kSCInsuffAppMemErr = 14;
- kSCBadConfigErr = 15;
- kSCNoDTOnStartupErr = 16;
- kSCDupNameErr = 17;
- kSCBadFileBufParmsErr = 19;
- kSCNeedRootUserErr = 20; { The range 21-28 are reserved for future use by Apple. }
- kSCBadSerialNumErr = 29;
- kSCSysTooOldErr = 34;
- kSCDupSerialNumberErr = 36; { NBP dup serial number detected }
- kSCVMOnErr = 37; { Virtual Memory is turned on on server machine }
- kSCNoPPCErr = 38; { Server only runs on a ppc machine }
- kSCBadInitErr = 39;
- kSCOpenTransportInstallErr = 40; { Incompatible version of Open Transport }
- kSCNoAgentLibErr = 41; { No ASRLib }
- kSCNoAgentSessionErr = 42; { Could not open an agent session }
- kSCInvalidAgentErr = 43; { No agent or a problem with the agent }
- kSCAgentServerObjErr = 44; { Bad server object type. }
- kSCAgentGenesisErr = 46;
- kSCAlreadyShuttingDown = -1;
- kSCAlreadyDisconnecting = -2;
- kSCDeletedPDSErr = -2;
- kSCContainsExpFolderErr = -3;
- kSCCantPrepareVolumeErr = -4;
- kSCTooManyExpFoldersErr = -5;
- kSCFixedPDSErr = -6;
- kSCExpFolderNamConfErr = -7;
- kSCNoExportFolderErr = -8;
- kSCInsideExpFolderErr = -9;
- kSCInsideTrashErr = -10;
- kSCVolNameConflictErr = -11;
- kSCCacheReducedErr = -12;
- kSCBadIPConfigErr = -20;
- kSCBadAccessPrivRecErr = -21;
- kSCBadMimeTypeFileErr = -22;
- kSCDuplicateVolumeErr = -23; { Second volume with same name will not be shared }
- { -100 to -199 are AFP errors }
- kSCAFPGenErr = -100;
- kSCAFPTCPGenErr = -150;
- kSCAFPTCPMemErr = -151;
- kSCAFPTCPPortInUseErr = -152; { -200 to -299 are FTP errors }
- kSCFTPGenErr = -200;
- kSCFTPPortInUseErr = -201;
- kSCFTPNotAvailErr = -202;
- kSCFTPMemErr = -203; { -300 to -399 are Web errors }
- kSCHTTPGenErr = -300;
- kSCHTTPPortInUseErr = -302;
- kSCHTTPFolderErr = -303;
- kSCHTTPFileErr = -304;
- kSCHTTPMemErr = -305;
- kSCHTTPNoMimeTypesErr = -306;
- kSCHTTPNoDefaultMimeErr = -307;
- kSCPluginDirNotFoundErr = -308;
- kSCPluginMemFullErr = -309;
- kSCPluginPreProcNotFoundErr = -310;
- kSCPluginPostProcNotFoundErr = -311;
- kSCErrorPluginNotFoundErr = -312;
- kSCPluginNotPreProcessorErr = -313;
- kSCPluginNotPostProcessorErr = -314;
- kSCPluginMemPoolFullErr = -315;
- kSCPluginOutOfMemoryErr = -316;
- kSCCorruptedMimeTypesErr = -317;
- kSCPlugInLoggingErr = -318;
- kSCPlugInTypeConflictErr = -319;
- kSCPlugInCannotRegisterErr = -320;
- kSCPlugInMemSmallErr = -321;
- kSCWebAdminNetworkErr = -330; { -400 to -499 are SMB errors }
- kSCSMBGenErr = -400;
- kSCSMBPortInUseErr = -402;
- kSCSMBMemErr = -405;
-
- { Define times for shutdown... }
- kSCMaxTimer = 4094;
- kSCMinTimer = 0;
-
- { Plugin errors (PlugInMimeTypeParam, PlugInInfoParam)... }
- kSCPlugInNoErr = 0;
- kSCPlugInWrongVersionErr = 1;
- kSCPlugInBadIndexErr = 2;
- kSCPlugInPlugInsNotLoadedErr = 3;
- kSCPlugInBadPlugInRefErr = 4;
-
- { Plugin info dimensions (C-strings)... }
- kSCPlugInNameSize = 32;
- kSCPlugInAdminURLSize = 256;
- kSCPlugInVersionStrSize = 12;
- kSCMimeTypeSize = 80;
- kSCSuffixSize = 32;
-
- { Number of samples in ServerHistoryRec... }
- kSCMaxDataPoints = 1024;
-
- { For siVersion field of SetupInfoRec... }
- kSCSetUpRecordVersion = 3;
-
- { VersionParam's scServerType contains the server type, which is interpreted as follows: }
- kSCMFSServerType = $0000; { Macintosh File Sharing }
- kSCAFSServerType = $0001; { AppleShare/AppleShare IP File Server }
-
- {$IFC UNDEFINED SCCACHESTATSRECVERS3 }
- {$SETC SCCACHESTATSRECVERS3 := 1 }
- { For csVersion field of SCCacheStatsRec... }
- kSCCacheStatsRecVersion = 3;
-
- {$ENDC}
-
- { Current version number of scFileInfoRec block... }
- kSCFileInfoRecVersion = 1;
-
- { Parameters for the "bitmap" field of ResetCacheParam... }
- kSCResetFileCache = $0001;
- kSCResetCNodeCache = $0002;
- kSCResetDTCache = $0004;
- kSCShrinkCache = $8000;
- kSCShrinkAllCaches = $8007;
-
- { For attrVersion field of ExtUserInfoParam... }
- kSCOldUserAttrRecVersion = 0;
- kSCUserAttrRecVersion = 1;
-
- { Current session layers for scProtocolType field of UserAttrRec... }
- kSCSessionInvalid = $0000;
- kSCSessionAll = 'alls';
- kSCSessionAFP = 'afp ';
- kSCSessionHTTP = 'http';
- kSCSessionFTP = 'ftp ';
- kSCSessionSMB = 'smb ';
- kSCSessionNFS = 'nfs ';
-
- { Current transport layers for scTransportType field of UserAttrRec... }
- kSCTransportATP = 'atp ';
- kSCTransportTCP = 'tcp ';
-
- { For version field of PlugInInfoParam... }
- kSCPlugInInfoParamVersion = 0;
-
- { For plugInAttributes field of PlugInInfoParam... }
- kSCAttPreProcessor = $00000001; { works as a preprocessor }
- kSCAttPostProcessor = $00000002; { works as a postprocessor }
- kSCAttFilter = $00000004; { works as filter }
- kSCAttAccessControl = $00000008; { works as access control }
- kSCAttErrorProcessor = $00000010; { works as error processor }
-
- { Current version number of SCSrvrMsgsRec... }
- kSCSrvrMsgsRecVersion = 1;
-
- { For version field of PlugInMimeTypeParam... }
- kSCPlugInMimeTypeParamVersion = 0;
-
- { For version field of BlockUserRecParam... }
- kSCBlockGetUserRecObsoleteVersion1 = 1;
- kSCBlockGetUserRecVersion = 2;
-
- { Flags for user in BlockUserRecParam... }
- kSCFlagUserSleeping = $00000001;
-
- { Other service states... }
- kSCFTPServiceBit = $01;
- kSCSMBServiceBit = $02;
-
- { Misc params... }
- kSCCurrentlyInstalled = 0;
- kSCUseFinderExtension = 0;
- kSCStartingEntity = 1;
- kSCStartingExtension = 2;
- kSCUseMessagePtr = 1;
-
- { Server Event Detail ----------------------------------------------------------------------------- }
- {
- Bit names for the serverEventMask field of ServerEventQEntry; event numbers returned in
- ServerEventRecord...
- }
- kSCStartAFPRequestEvt = 0; { also set afpCommandMask for these }
- kSCSendAFPResponseEvt = 1;
-
- kSCServerControlCallEvt = 4; { also set serverControlMask for this }
-
- kSCServerBusyEvt = 2;
- kSCServerShutdownEvt = 3;
- kSCShareEvt = 5;
- kSCUnShareEvt = 6;
- kSCSetDirAccessEvt = 7;
- kSCServerNameChangeEvt = 8;
- kSCVolumePrepEvt = 9;
- kSCVolumeUnmountEvt = 10;
- kSCServerStartupEvt = 11;
- kSCSessionTornDownEvt = 12;
- kSCOutOfSequenceEvt = 13;
- kSCWksClosedSessionEvt = 14;
- kSCSessionTimedOutEvt = 15;
- kSCSrvrClosedSessionEvt = 16;
- kSCExtendedServerEvtRec = 31;
-
- { Maximum size of the Buffer in the ServerEventRecord... }
- kBufferMax = 48;
-
-
- TYPE
- IPBlockPtr = ^IPBlock;
- IPBlock = RECORD
- part: PACKED ARRAY [0..3] OF UInt8;
- END;
-
- UserAddressPtr = ^UserAddress;
- UserAddress = RECORD
- CASE INTEGER OF
- 0: (
- wholeAddress: UInt32;
- );
- 1: (
- appleTalkAddress: AddrBlock;
- );
- 2: (
- ipAddress: IPBlock;
- );
- END;
-
- ServerEventRecordPtr = ^ServerEventRecord;
- ServerEventRecord = RECORD
- eventNumber: SInt32;
- serverTimeInSeconds: UInt32;
- result: SInt16;
- bufferSize: SInt16;
- buffer: PACKED ARRAY [0..47] OF CHAR;
- nameStr: Str31;
- afpCommand: SInt16;
- sessionID: SInt32;
- userID: SInt32;
- userName: Str31;
- vRefNum: SInt16;
- dirID: SInt32;
- addr: UserAddress;
- END;
-
- { For annexVersion field; set by server to indicate version of record... }
-
- CONST
- kServerEventAnnexVersion6 = $06000000;
-
-
- TYPE
- ExtendedServerEventRecordPtr = ^ExtendedServerEventRecord;
- ExtendedServerEventRecord = RECORD
- eventNumber: SInt32;
- serverTimeInSeconds: UInt32;
- result: SInt16;
- bufferSize: SInt16;
- buffer: PACKED ARRAY [0..47] OF CHAR;
- nameStr: Str31;
- afpCommand: SInt16;
- sessionID: SInt32;
- userID: SInt32;
- userName: Str31;
- vRefNum: SInt16;
- dirID: SInt32;
- addr: UserAddress;
- transportType: FourCharCode;
- annexVersion: UInt32;
- END;
-
- {$IFC TYPED_FUNCTION_POINTERS}
- ServerEventHandlerProcPtr = PROCEDURE(entry: ServerEventQEntryPtr; VAR event: ExtendedServerEventRecord);
- {$ELSEC}
- ServerEventHandlerProcPtr = ProcPtr;
- {$ENDC}
-
- ServerEventHandlerUPP = UniversalProcPtr;
- ServerEventQEntryPtr = ^ServerEventQEntry;
- ServerEventQEntry = RECORD
- next: ServerEventQEntryPtr;
- queuetype: SInt16;
- callBack: ServerEventHandlerUPP;
- serverEventMask: SInt32;
- afpCommandMask: ARRAY [0..1] OF SInt32;
- serverControlMask: SInt32;
- END;
-
-
- CONST
- uppServerEventHandlerProcInfo = $000003C0;
-
- FUNCTION NewServerEventHandlerUPP(userRoutine: ServerEventHandlerProcPtr): ServerEventHandlerUPP; { old name was NewServerEventHandlerProc }
- {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
- INLINE $2E9F;
- {$ENDC}
-
- PROCEDURE DisposeServerEventHandlerUPP(userUPP: ServerEventHandlerUPP);
- {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
- INLINE $584F;
- {$ENDC}
- { Server Control Data Structures ------------------------------------------------------------------ }
- {
- Since all calls are made through ServerDispatchSync, ioCompletion is ignored, so this is for
- completeness only...,
- }
-
- TYPE
- SCCompletionUPP = UniversalProcPtr;
- StartParamPtr = ^StartParam;
- StartParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- reserved: SInt32;
- reserved2: SInt16;
- reserved3: SInt16;
- scCode: SInt16;
- scStartSelect: SInt16;
- scEventSelect: SInt16;
- scWhere: SInt32;
- scReceiverID: SInt32;
- scDataType: SInt32;
- scStartOptions: SInt32;
- END;
-
- DisconnectParamPtr = ^DisconnectParam;
- DisconnectParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- scDiscArrayPtr: LongIntPtr;
- scArrayCount: SInt16;
- reserved: SInt16;
- scCode: SInt16;
- scNumMinutes: SInt16;
- scFlags: SInt16;
- scMessagePtr: StringPtr;
- END;
-
- PollServerParamPtr = ^PollServerParam;
- PollServerParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- reserved: SInt32;
- reserved2: SInt16;
- reserved3: SInt16;
- scCode: SInt16;
- scServerState: SInt16;
- scDisconnectState: SInt16;
- scServerError: SInt16;
- scSecondsLeft: SInt32;
- END;
-
- StandardParamPtr = ^StandardParam;
- StandardParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- scNamePtr: StringPtr;
- scVRefNum: SInt16;
- scLogins: SInt16;
- scCode: SInt16;
- scIndex: SInt16;
- scDirID: SInt32;
- END;
-
- Str198 = STRING[198];
- SetupInfoRecPtr = ^SetupInfoRec;
- SetupInfoRec = RECORD
- siVersion: SInt16;
- siFlags: SInt16;
- siMaxLogins: SInt16;
- siSrvrUsageLimit: SInt16;
- siVolInfoLocation: Point;
- siVolInfoVisible: BOOLEAN;
- siReserved1: BOOLEAN;
- siUserInfoLocation: Point;
- siUserInfoVisible: BOOLEAN;
- siReserved2: BOOLEAN;
- siShutDownMins: SInt16;
- siCacheControl: SInt16; { no longer used }
- siVolParmsStepSize: SInt16;
- siVolParmsIncrement: SInt16;
- siVolParmsFirstDelay: SInt16;
- siVolParmsMaxDelay: SInt16;
- siRACacheFileBufSize: SInt32; { no longer used }
- siRACacheSize: SInt32; { no longer used }
- siDirCacheMaxWidth: SInt16; { no longer used }
- siDirCacheSize: SInt32; { no longer used }
- siIconCacheSize: SInt32; { no longer used }
- siBTMemReservedFromCache: SInt32;
- siSpare: ARRAY [0..0] OF SInt16; { reserved }
- siLoginMsg: Str198;
- END;
-
- SetupInfoPtr = ^SetupInfoRec;
- SetupParamPtr = ^SetupParam;
- SetupParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- scSetupPtr: SetupInfoPtr;
- scMaxVolumes: SInt16;
- scMaxExpFolders: SInt16;
- scCode: SInt16;
- scCurMaxSessions: SInt16;
- END;
-
- StatusParamPtr = ^StatusParam;
- StatusParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- scNamePtr: StringPtr;
- reserved2: SInt16;
- reserved3: SInt16;
- scCode: SInt16;
- scServerFlags: SInt16;
- scNumSessions: SInt16;
- scUserListModDate: SInt32;
- scActivity: SInt16;
- scVolListModDate: SInt32;
- END;
-
- ServerEventParamPtr = ^ServerEventParam;
- ServerEventParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- scSEQEntryPtr: ServerEventQEntryPtr;
- reserved2: SInt16;
- reserved3: SInt16;
- scCode: SInt16;
- END;
-
- VersionParamPtr = ^VersionParam;
- VersionParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- scExtNamePtr: StringPtr;
- reserved2: SInt16;
- reserved3: SInt16;
- scCode: SInt16;
- scServerType: SInt16;
- scServerVersion: SInt16;
- END;
-
- UserInfoParamPtr = ^UserInfoParam;
- UserInfoParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- scNamePtr: StringPtr;
- reserved2: SInt16;
- reserved3: SInt16;
- scCode: SInt16;
- scPosition: SInt32;
- scUNRecID: SInt32;
- scUserID: SInt32;
- scLoginTime: SInt32;
- scLastUseTime: SInt32;
- scSocketNum: SInt32;
- END;
-
- VolMountedParamPtr = ^VolMountedParam;
- VolMountedParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- reserved: Ptr;
- scVRefNum: SInt16;
- reserved3: SInt16;
- scCode: SInt16;
- scFilesOpen: SInt16;
- scWriteableFiles: SInt16;
- scUNRecID: SInt32;
- scMounted: BOOLEAN;
- scMountedAsOwner: BOOLEAN;
- END;
-
- SCCacheStatsRecPtr = ^SCCacheStatsRec;
- SCCacheStatsRec = RECORD
- csVersion: SInt16;
- csCacheTime: SInt32;
- csRACacheAttempts: SInt32; { file cache }
- csRACacheHits: SInt32;
- csRACacheTotalEntries: SInt32;
- csRACacheEntriesInUse: SInt32;
- csRACacheEntrySize: SInt32;
- csDirCacheAttempts: SInt32; { dir cache }
- csDirCacheHits: SInt32;
- csDirCacheTotalEntries: SInt32;
- csDirCacheEntriesInUse: SInt32;
- csDirCacheEntrySize: SInt32;
- csIconCacheAttempts: SInt32; { dt cache }
- csIconCacheHits: SInt32;
- csIconCacheTotalEntries: SInt32;
- csIconCacheEntriesInUse: SInt32;
- csIconCacheEntrySize: SInt32;
- csACtlCacheAttempts: SInt32; { PDS info, part of dir cache }
- csACtlCacheHits: SInt32;
- csACtlCacheTotalEntries: SInt32;
- csACtlCacheEntriesInUse: SInt32;
- csACtlCacheEntrySize: SInt32;
- csAUXCacheAttempts: SInt32; { not used }
- csAUXCacheHits: SInt32;
- csAUXCacheTotalEntries: SInt32;
- csAUXCacheEntriesInUse: SInt32;
- csAUXCacheEntrySize: SInt32;
- { New fields for version 3 record }
- csEnumCacheAttempts: SInt32;
- csEnumCacheHits: SInt32;
- csEnumCacheTotalEntries: SInt32;
- csEnumCacheEntriesInUse: SInt32;
- csEnumCacheEntrySize: SInt32;
- csMaxFBUsed: SInt32;
- csSkipPrsAttempts: SInt32;
- csSkipPrsHits: SInt32;
- END;
-
- SCOldCacheStatsRecPtr = ^SCOldCacheStatsRec;
- SCOldCacheStatsRec = RECORD
- csVersion: SInt16;
- csCacheTime: SInt32;
- csRACacheAttempts: SInt32; { file cache }
- csRACacheHits: SInt32;
- csRACacheTotalEntries: SInt32;
- csRACacheEntriesInUse: SInt32;
- csRACacheEntrySize: SInt32;
- csDirCacheAttempts: SInt32; { dir cache }
- csDirCacheHits: SInt32;
- csDirCacheTotalEntries: SInt32;
- csDirCacheEntriesInUse: SInt32;
- csDirCacheEntrySize: SInt32;
- csIconCacheAttempts: SInt32; { dt cache }
- csIconCacheHits: SInt32;
- csIconCacheTotalEntries: SInt32;
- csIconCacheEntriesInUse: SInt32;
- csIconCacheEntrySize: SInt32;
- csACtlCacheAttempts: SInt32; { PDS info, part of dir cache }
- csACtlCacheHits: SInt32;
- csACtlCacheTotalEntries: SInt32;
- csACtlCacheEntriesInUse: SInt32;
- csACtlCacheEntrySize: SInt32;
- csAUXCacheAttempts: SInt32; { not used }
- csAUXCacheHits: SInt32;
- csAUXCacheTotalEntries: SInt32;
- csAUXCacheEntriesInUse: SInt32;
- csAUXCacheEntrySize: SInt32;
- END;
-
- GetCacheStatsParamPtr = ^GetCacheStatsParam;
- GetCacheStatsParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- reserved: Ptr;
- reserved2: SInt16;
- reserved3: SInt16;
- scCode: SInt16;
- reserved4: SInt16;
- scCacheStatsPtr: SCCacheStatsRecPtr;
- scCacheStatsReqSize: SInt16;
- scCacheStatsActSize: SInt16;
- END;
-
- ResetCacheParamPtr = ^ResetCacheParam;
- ResetCacheParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- reserved: SInt32;
- reserved2: SInt16;
- reserved3: SInt16;
- scCode: SInt16;
- bitmap: SInt16;
- END;
-
- { Used in extended user call if attrVersion is kOldUserAttrRecVersion... }
- OldUserAttrRecPtr = ^OldUserAttrRec;
- OldUserAttrRec = RECORD
- scLoginTime: SInt32;
- scLastUseTime: SInt32;
- scSocketNum: SInt32;
- scConnectionType: SInt16;
- scDisconnectID: SInt16;
- END;
-
- OldUserAttrPtr = ^OldUserAttrRec;
- { Used in extended user call if attrVersion is kUserAttrRecVersion... }
- UserAttrRecPtr = ^UserAttrRec;
- UserAttrRec = RECORD
- scLoginTime: SInt32;
- scLastUseTime: SInt32;
- scSocketNum: SInt32;
- scProtocolType: FourCharCode; { The Session Protocol, i.e. AFP, FTP, SMB }
- scTransportType: FourCharCode; { The Transport, i.e. ATP, TCP/IP }
- scSessionNamePtr: StringPtr; { Str63 }
- scDisconnectID: SInt32;
- END;
-
- UserAttrPtr = ^UserAttrRec;
- ExtUserInfoParamPtr = ^ExtUserInfoParam;
- ExtUserInfoParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- scNamePtr: StringPtr;
- reserved2: SInt16;
- reserved3: SInt16;
- scCode: SInt16;
- scPosition: SInt32;
- scUNRecID: SInt32;
- scUserID: SInt32;
- attrVersion: SInt16;
- scUserAttrPtr: UserAttrPtr;
- END;
-
- ServiceStateParamPtr = ^ServiceStateParam;
- ServiceStateParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- reserved: StringPtr;
- reserved2: SInt16;
- reserved3: SInt16;
- scCode: SInt16;
- afpTCPState: SInt16;
- httpState: SInt16;
- otherState: SInt16;
- multiHoming: SInt16;
- srvrUsageLimit: SInt16;
- END;
-
- PlugInInfoParamPtr = ^PlugInInfoParam;
- PlugInInfoParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- reserved: SInt32;
- reserved2: SInt16;
- reserved3: SInt16;
- scCode: SInt16;
- version: SInt16;
- index: SInt32;
- error: SInt8;
- reserved4: SInt8;
- name: PACKED ARRAY [0..31] OF CHAR;
- versionStr: PACKED ARRAY [0..11] OF CHAR;
- adminURL: PACKED ARRAY [0..255] OF CHAR;
- plugInAttributes: UInt32;
- plugInRef: SInt32;
- isLast: SInt16;
- END;
-
- PlugInMimeTypeParamPtr = ^PlugInMimeTypeParam;
- PlugInMimeTypeParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- reserved: SInt32;
- reserved2: SInt16;
- reserved3: SInt16;
- scCode: SInt16;
- version: SInt16;
- plugInRef: SInt32;
- index: SInt32;
- error: SInt8;
- reserved4: SInt8;
- mimetype: PACKED ARRAY [0..79] OF CHAR;
- suffix: PACKED ARRAY [0..31] OF CHAR;
- typeCode: OSType;
- creatorCode: OSType;
- isLast: SInt16;
- END;
-
- SetHistoryParamPtr = ^SetHistoryParam;
- SetHistoryParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- reserved: SInt32;
- reserved2: SInt16;
- historySampleTime: SInt16;
- scCode: SInt16;
- END;
-
- HistoryDataPtr = ^HistoryData;
- HistoryData = RECORD
- dpMin: SInt8;
- dpMax: SInt8;
- dpAverage: SInt8;
- filler: SInt8;
- END;
-
- ServerHistoryRecPtr = ^ServerHistoryRec;
- ServerHistoryRec = RECORD
- historySyncCount: UInt32;
- historyLastSample: UInt32;
- historySampleTime: UInt16;
- numDataPoints: UInt16;
- dataPoint: ARRAY [0..1023] OF HistoryData;
- END;
-
- ServerHistoryPtr = ^ServerHistoryRec;
- GetHistoryParamPtr = ^GetHistoryParam;
- GetHistoryParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- scHistory: ServerHistoryPtr;
- numDataPointsRequested: SInt16;
- reserved2: SInt16;
- scCode: SInt16;
- END;
-
- SMBConfigParamPtr = ^SMBConfigParam;
- SMBConfigParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code }
- reserved: UInt32;
- reserved2: UInt32;
- scCode: SInt16;
- enabled: BOOLEAN;
- reserved3: SInt8;
- netBIOSName: Str63;
- workgroupName: Str63;
- comment: Str63;
- winsAddress: Str63;
- END;
-
- {
- Do not use the following ObsoleteBlockUserRec structure. This corresponds
- to the original BlockUserRecParam call version (version 1), and has been
- superceeded by version 2 as of May, 1999. The BlockGetUser call will
- honor the old format for binary compatibilty, but you should switch
- to using the most current version. The change is to the field "name",
- which has been switched from type Str32Field to type Str31. This removes
- alignment and padding problems with some compilers, and is more correct.
- }
- ObsoleteBlockUserRec1Ptr = ^ObsoleteBlockUserRec1;
- ObsoleteBlockUserRec1 = RECORD
- name: Str32Field;
- recID: UInt32;
- id: UInt32;
- loginTime: UInt32;
- lastUseTime: UInt32;
- serviceType: OSType;
- sessionType: OSType;
- CASE INTEGER OF
- 0: (
- at: AddrBlock;
- );
- 1: (
- ip: UInt32;
- );
- END;
-
- BlockUserRecPtr = ^BlockUserRec;
- BlockUserRec = RECORD
- name: Str31;
- recID: UInt32;
- id: UInt32;
- loginTime: UInt32;
- lastUseTime: UInt32;
- serviceType: OSType;
- sessionType: OSType;
- flags: UInt32;
- disconnectTimer: UInt32;
- CASE INTEGER OF
- 0: (
- at: AddrBlock;
- );
- 1: (
- ip: UInt32;
- );
- END;
-
- BlockUserPtr = ^BlockUserRec;
- BlockUserRecParamPtr = ^BlockUserRecParam;
- BlockUserRecParam = RECORD
- qLink: QElemPtr; { queue link in header }
- qType: SInt16; { type byte for safety check }
- ioTrap: SInt16; { FS: the Trap }
- ioCmdAddr: Ptr; { FS: address to dispatch to }
- ioCompletion: SCCompletionUPP; { completion routine addr (0 for synch calls) }
- ioResult: OSErr; { result code; -39 == more users than buffer }
- reserved: UInt32;
- reserved2: UInt32;
- scCode: SInt16;
- version: UInt32; { Should be kSCBlockGetUserRecVersion. }
- numUsers: UInt32; { On input, size of buffer. On output, num users. }
- users: BlockUserPtr; { Pointer to array of SUserRecs to be filled in by call. }
- END;
-
- SCParamBlockRecPtr = ^SCParamBlockRec;
- SCParamBlockRec = RECORD
- CASE INTEGER OF
- 0: (
- startParam: StartParam;
- );
- 1: (
- disconnectParam: DisconnectParam;
- );
- 2: (
- pollServerParam: PollServerParam;
- );
- 3: (
- standardParam: StandardParam;
- );
- 4: (
- setupParam: SetupParam;
- );
- 5: (
- statusParam: StatusParam;
- );
- 6: (
- serverEventParam: ServerEventParam;
- );
- 7: (
- versionParam: VersionParam;
- );
- 8: (
- userInfoParam: UserInfoParam;
- );
- 9: (
- volMountedParam: VolMountedParam;
- );
- 10: (
- getCacheStatsParam: GetCacheStatsParam;
- );
- 11: (
- resetCacheParam: ResetCacheParam;
- );
- 12: (
- extUserInfoParam: ExtUserInfoParam;
- );
- 13: (
- serviceStateParam: ServiceStateParam;
- );
- 14: (
- plugInInfoParam: PlugInInfoParam;
- );
- 15: (
- plugInMimeTypeParam: PlugInMimeTypeParam;
- );
- 16: (
- setHistoryParam: SetHistoryParam;
- );
- 17: (
- getHistoryParam: GetHistoryParam;
- );
- 18: (
- smbConfigParam: SMBConfigParam;
- );
- 19: (
- blockGetUserParam: BlockUserRecParam;
- );
- END;
-
- SCParamBlockPtr = ^SCParamBlockRec;
- SCParamBlockPtrPtr = ^SCParamBlockPtr;
- { 68K Trap Interface ------------------------------------------------------------------------------ }
- FUNCTION ServerDispatchSync(paramBlock: SCParamBlockPtr): OSErr;
- {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
- INLINE $205F, $7000, $A094, $3E80;
- {$ENDC}
- { Note: there is no ServerDispatchAsync! }
- { Gestaltage -------------------------------------------------------------------------------------- }
-
-
- CONST
- gestaltASIPFSVersion = '#!#7'; { Defined only from 6.0... }
-
- { ------------------------------------------------------------------------------------------------- }
-
- {$ALIGN RESET}
- {$POP}
-
- {$SETC UsingIncludes := AppleShareFileServerControlIncludes}
-
- {$ENDC} {__APPLESHAREFILESERVERCONTROL__}
-
- {$IFC NOT UsingIncludes}
- END.
- {$ENDC}
-